package handler

import (
	"net/http"

	"github.com/99designs/gqlgen/graphql/playground"
)

// Defining the Playground handler
func PlaygroundHandler() http.HandlerFunc {
	h := playground.Handler("GraphQL playground", "/graphql")

	return func(w http.ResponseWriter, r *http.Request) {
		h.ServeHTTP(w, r)
	}
}
